﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Bands.aspx.cs" Inherits="Festival_Locator.Bands" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">

    <hgroup class="title">
                <h1>Bands</h1>
    </hgroup>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>" SelectCommand="SELECT [band_id], [band_naam], [band_soortMuziek] FROM [Bands]"></asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="band_naam" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="band_id" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="band_id"  Visible="false "/>
            <asp:BoundField DataField="band_naam" HeaderText="<%$ Resources:SiteResources, Bandname %>" SortExpression="band_naam" />
            <asp:BoundField DataField="band_soortMuziek" HeaderText="Genre" SortExpression="band_soortMuziek" />
            <asp:CommandField SelectText="Details" ShowSelectButton="True" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>" SelectCommand="FestivalsPerBand" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="GridView1" Name="bandnaam" PropertyName="SelectedValue" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" DataSourceID="SqlDataSource2" Height="83px" Width="125px" AutoGenerateRows="False">
        <Fields>
            <asp:BoundField DataField="fest_naam" HeaderText="Festival" SortExpression="fest_naam" />
            <asp:BoundField DataField="datum" HeaderText="<%$ Resources:SiteResources, Date %>" SortExpression="datum" DataFormatString="{0:dd/MM/yyyy}" HTMLEncode="false"/>
            <asp:BoundField DataField="pod_omschr" HeaderText="<%$ Resources:SiteResources, Stage%>" SortExpression="pod_omschr" />
        </Fields>
    </asp:DetailsView>
<br />
</asp:Content>
